// page 63
var http = require('http');

var opt = {
	host: 'localhost', // don't http://
	port: 8080,
	path: '/',
	method: 'GET'
};

var req = http.request(opt, function(res) {
	res.setEncoding('utf8');
	res.on('data', function(data) {
		console.log(data);
	});
});

req.end();